#ifndef CLIENT_H
#define CLIENT_H

#include <QDialog>
#include <QLocalSocket>

class QDialogButtonBox;
class QLabel;
class QLineEdit;
class QPushButton;

class Client : public QDialog
{
    Q_OBJECT
public:
    Client(QWidget *parent = 0);

private slots:
    void requestFortune();
    void readFortune();
    void displayErr(QLocalSocket::LocalSocketError error);
    void enableGetFortuneButton();

public slots:

private:
    QLabel *hostLabel;
    QLineEdit *hostLineEdit;
    QLabel *statusLabel;
    QPushButton *getFortuneButton;
    QPushButton *quitButton;
    QDialogButtonBox *buttonBox;

    QLocalSocket *socket;
    QString currentFortune;
    quint16 blockSize;
};

#endif // CLIENT_H
